package com.foreknow.elmboot.mapper;

import com.foreknow.elmboot.po.Business;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 最酷的桃儿wjc
 * * @date 2022/5/7
 */
@Mapper
public interface BusinessMapper {
    /**
     * 根据点餐分类编号查询所属商家信息
     * @param orderTypeId
     * @return
     */
    @Select("select * from business where orderTypeId=#{orderTypeId}")
    public List<Business> listBusinessByOrderTypeId(Integer orderTypeId);

    /**
     * 根据商家编号查询商家信息
     * @param businessId
     * @return
     */
    @Select("select * from business where businessId=#{businessId}")
    public Business getBusinessById(Integer businessId);
}
